/*    */ package org.poebot.hal;
/*    */ 
/*    */ import java.awt.Color;
/*    */ import java.awt.Component;
/*    */ import java.awt.Dimension;
/*    */ import javax.swing.JLabel;
/*    */ import javax.swing.JList;
/*    */ import javax.swing.ListCellRenderer;
/*    */ 
/*    */ public class ChatListCellRenderer extends JLabel
/*    */   implements ListCellRenderer
/*    */ {
/*    */   private static final long serialVersionUID = -4065308054393880619L;
/*    */ 
/*    */   public ChatListCellRenderer()
/*    */   {
/* 18 */     setForeground(Color.black);
/* 19 */     setBackground(Color.white);
/* 20 */     setMaximumSize(new Dimension(20, 20));
/*    */   }
/*    */ 
/*    */   public Component getListCellRendererComponent(JList list, Object object, int index, boolean isSelected, boolean cellHasFocus)
/*    */   {
/* 28 */     if ((object instanceof String))
/*    */     {
/* 30 */       String text = (String)object;
/* 31 */       setText(text);
/*    */     }
/*    */     else
/*    */     {
/* 35 */       setText("error");
/*    */     }
/*    */ 
/* 39 */     return this;
/*    */   }
/*    */ }

/* Location:           C:\workspace\dognuts\dognuts\dognuts.jar
 * Qualified Name:     org.dognuts.gui.ChatListCellRenderer
 * JD-Core Version:    0.6.0
 */